3.169 \(\int \frac{\tan ^2(d (a+b \log (c x^n)))}{x} \, dx\)

Optimal. Leaf size=29 \[ \frac{\tan \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\log (x) \]

[Out]

-Log[x] + Tan[a*d + b*d*Log[c*x^n]]/(b*d*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0289976, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3473, 8} \[ \frac{\tan \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\log (x) \]

Antiderivative was successfully verified.

[In]

Int[Tan[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

-Log[x] + Tan[a*d + b*d*Log[c*x^n]]/(b*d*n)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\tan ^2\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \tan ^2(d (a+b x)) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac{\tan \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\frac{\operatorname{Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\log (x)+\frac{\tan \left (a d+b d \log \left (c x^n\right )\right )}{b d n}\\ \end{align*}

Mathematica [A]  time = 0.0820285, size = 51, normalized size = 1.76 \[ \frac{\tan \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\frac{\tan ^{-1}\left (\tan \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

-(ArcTan[Tan[a*d + b*d*Log[c*x^n]]]/(b*d*n)) + Tan[a*d + b*d*Log[c*x^n]]/(b*d*n)

________________________________________________________________________________________

Maple [A]  time = 0.019, size = 50, normalized size = 1.7 \begin{align*}{\frac{\tan \left ( d \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) }{bdn}}-{\frac{\arctan \left ( \tan \left ( d \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) \right ) }{bdn}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*(a+b*ln(c*x^n)))^2/x,x)

[Out]

1/b/d/n*tan(d*(a+b*ln(c*x^n)))-1/b/d/n*arctan(tan(d*(a+b*ln(c*x^n))))

________________________________________________________________________________________

Maxima [B]  time = 1.33222, size = 432, normalized size = 14.9 \begin{align*} -\frac{{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} \log \left (x\right ) +{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \log \left (x\right ) \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} + b d n \log \left (x\right ) + 2 \,{\left (b d n \cos \left (2 \, b d \log \left (c\right )\right ) \log \left (x\right ) - \sin \left (2 \, b d \log \left (c\right )\right )\right )} \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) - 2 \,{\left (b d n \log \left (x\right ) \sin \left (2 \, b d \log \left (c\right )\right ) + \cos \left (2 \, b d \log \left (c\right )\right )\right )} \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )}{2 \, b d n \cos \left (2 \, b d \log \left (c\right )\right ) \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) - 2 \, b d n \sin \left (2 \, b d \log \left (c\right )\right ) \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) +{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} +{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} + b d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*(a+b*log(c*x^n)))^2/x,x, algorithm="maxima")

[Out]

-((b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*cos(2*b*d*log(x^n) + 2*a*d)^2*log(x) + (b*d*cos(2*b*d*
log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*log(x)*sin(2*b*d*log(x^n) + 2*a*d)^2 + b*d*n*log(x) + 2*(b*d*n*cos(2*b*
d*log(c))*log(x) - sin(2*b*d*log(c)))*cos(2*b*d*log(x^n) + 2*a*d) - 2*(b*d*n*log(x)*sin(2*b*d*log(c)) + cos(2*
b*d*log(c)))*sin(2*b*d*log(x^n) + 2*a*d))/(2*b*d*n*cos(2*b*d*log(c))*cos(2*b*d*log(x^n) + 2*a*d) - 2*b*d*n*sin
(2*b*d*log(c))*sin(2*b*d*log(x^n) + 2*a*d) + (b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*cos(2*b*d*l
og(x^n) + 2*a*d)^2 + (b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*sin(2*b*d*log(x^n) + 2*a*d)^2 + b*d
*n)

________________________________________________________________________________________

Fricas [B]  time = 0.478696, size = 242, normalized size = 8.34 \begin{align*} -\frac{b d n \cos \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right ) \log \left (x\right ) + b d n \log \left (x\right ) - \sin \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right )}{b d n \cos \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right ) + b d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*(a+b*log(c*x^n)))^2/x,x, algorithm="fricas")

[Out]

-(b*d*n*cos(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d)*log(x) + b*d*n*log(x) - sin(2*b*d*n*log(x) + 2*b*d*log(c) +
 2*a*d))/(b*d*n*cos(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d) + b*d*n)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (a d + b d \log{\left (c x^{n} \right )} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*(a+b*ln(c*x**n)))**2/x,x)

[Out]

Integral(tan(a*d + b*d*log(c*x**n))**2/x, x)

________________________________________________________________________________________

Giac [B]  time = 2.28555, size = 135, normalized size = 4.66 \begin{align*} -\frac{\tan \left (b d \log \left (c\right )\right )^{2} \tan \left (a d\right )^{2} + \tan \left (b d \log \left (c\right )\right )^{2} + \tan \left (a d\right )^{2} + 1}{{\left (b d n \tan \left (b d \log \left (c\right )\right ) + b d n \tan \left (a d\right )\right )}{\left (\tan \left (b d n \log \left (x\right )\right ) \tan \left (b d \log \left (c\right )\right ) + \tan \left (b d n \log \left (x\right )\right ) \tan \left (a d\right ) + \tan \left (b d \log \left (c\right )\right ) \tan \left (a d\right ) - 1\right )}} - \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*(a+b*log(c*x^n)))^2/x,x, algorithm="giac")

[Out]

-(tan(b*d*log(c))^2*tan(a*d)^2 + tan(b*d*log(c))^2 + tan(a*d)^2 + 1)/((b*d*n*tan(b*d*log(c)) + b*d*n*tan(a*d))
*(tan(b*d*n*log(x))*tan(b*d*log(c)) + tan(b*d*n*log(x))*tan(a*d) + tan(b*d*log(c))*tan(a*d) - 1)) - log(x)